package com.ljh.webtask5.mybatisplus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * @author laijiahong
 */
@Data
@TableName(value = "book")
public class Book {
    @TableId(type = IdType.AUTO)
    private Long index;
    private String name;
    private String author;
    private String press;
    private String publicDate;
    private int surplus;

    public Book() {
    }

    public Book(String name, String author, String press, String publicDate, int surplus) {
        this.name = name;
        this.author = author;
        this.press = press;
        this.publicDate = publicDate;
        this.surplus = surplus;
    }
}
